Guided Segmentation

Guided Segmentation is designed to allow 3D segmentation of complex objects that cannot be easily segmented using threshold segmentation. Guided segmentation involves defining object outlines in the 2D view and then generating 3D volume objects from those outlines.

This feature provides an easy and intuitive method of image segmentation where you can define the reference areas for background and objects. These areas are then used to create segmentation masks to count and measure objects.

To use this feature, click the Guided button: The Guided Segmentation panel appears on the right hand side of the workspace. The panel contains four sub-panels:

Collections

2D Segmentation

Z-Propagation

Iso-surface

To use Guided Segmentation, follow these steps:

Open a sequence in the workspace.

On the 3D Measure ribbon, press Guided to open the Guided Segmentation dialog. Note that in the Collections sub-panel, a first object collection will already have been created. If the volume that you want to segment opens in the 3D view, Image-Pror will switch to the Image (2D) view for the process of drawing object outlines. If you already had the Guided Segmentation panel open when you opened your sequence, use the Image button ( ) in the status bar or Image Context menu, or the 2D button in the Collections sub-panel to switch to the 2D image view.

Navigate to any frame (or Z-plane) in the volume where the first object of interest is visible. You can start at any plane in the Z-stack.

Use any tool in 2D Segmentation sub-panel to create one or more object outlines for that object. See the documentation of the 2D Segmentation sub-panel for more details about the tools that can be used to create the object outlines.

Once you have defined your outlines, use the Validate button to set those outlines as the objects' ROIs.

In the Z-propagation sub-panel, choose a method to copy your outlines to other frames in the z-stack.

Press the forward and/or back buttons in the Z-propagation sub-panel to extend the object ROIs through the stack.

Lock the object collection by checking the box next to its name in the Collections sub-panel. You may continue to add object collections by pressing the Add button in the Collections sub-panel. Note that adding a new collection will automatically lock the previous collection(s).

Repeat steps 4-9 for each collection to be added.

To view the collections in 3D, use one of the selections in the Iso-surface sub-panel to turn your collections into iso-surfaces in the 3D Viewer.

Collections

The Collections section of the Guided Segmentation panel contains tools to control collections. It allows you to add and define certain properties, and to visualize segmented outlines interactively.

Segmentation collections are defined by a set of outlines on multiple frames. Multiple outlines can be defined for a single collection on one frame. A collection is identified by its name and color, which can be edited in the collections sub-panel of the guided segmentation panel.

A new collection can be added clicking the Add button. The collection can be deleted or reset . It can also be saved or loaded from a file. You can use the Delete All button to remove all the existing collections and start over. Note that when all the collections are deleted, a new, default collection R1 is automatically added.

The Lock option applies only to the active collection. It allows you to review the segmentation without applying the active propagation method when scrolling through the image sequence. It also controls whether editing tools are available, or if the collections are locked. All collections except the active one will always show a locked state, and the active row can be locked or unlocked by clicking the check box. Checking the Lock check box freezes the selected collection and prevents additional editing until the collection is unlocked. Note that the 2D Segmentation and Z-propagation sub-panels will include the name of the active collection.

Multiple collections can be displayed on the image when the Show All Collections box is checked. When this option is off, only the active object ROI will be displayed.

Display of the collections’ labels is controlled by the Show labels check box. Note that the size and font of the labels can be controlled from the measurement options panel.

The Frames column shows the number of frames in the sequence.

The View buttons are used to display the view(s) that you would like to have visible while defining the object outlines and iso-surfaces. The 2D button will open a new view of your volume in the Image view if there is not already an Image view open, and it will make that view the active workspace view. The 3D button will open a new view of your volume in the 3D view if necessary, and it will make that view the active workspace view.

The 2D / 3D button will make sure that both views are open, and display them in a split workspace layout with the 2D view on the left and the 3D view on the right.

Outline color allows you to change the color of the object’s outline using the color selector.

Note: Volume objects can also be exported as outlines from the 3D Data Table to Guided Segmentation using the Export Outlines menu item from the context menu over the 3D Data Table object row.

2D Segmentation

The 2D Segmentation sub-panel offers 3 main modes of operation that enable different methods that you can use for defining the object outlines. The three modes are:

  • Wand, where you will primarily use the Magic Wand tool to define the outlines by outlining an area based on the color similarities or difference of intensity ranges between the pixel under your cursor, plus or minus a specified tolerance interval.

  • Smart, where you will use the Smart Segmentation tools to define the outlines by defining reference areas for background versus objects.

  • ROI, where you will primarily use manual tools to draw the object outlines.

The following tools are available for all three modes:

Select: Use the Select tool arrow to select an ROI on the image.

Nudge: The Polygon Nudge tool allows you to adjust the size and shape of irregular ROIs and measurements

Polygon: The Polygon tool allows you define a polygon-shaped or freeform ROI in the image.

Validate: Clicking Validate converts your collections to ROIs.

Delete/Delete All: You can use these tools to delete a single collection or all collections.

Wand Mode

You can define object outlines by selecting the Wand tab and clicking on the object to segment.

After the first click on the image, the threshold range will be displayed in the Histogram control. You can adjust intensity range of the Magic Wand using the From and To controls or by dragging the range indicators on the histogram. You can also use additional magic wand controls to adjust the automatic outlining: Range, Filter, Smoothing and Fill Holes.

Ranges. Indicates the lower and upper levels used for thresholding.

Filter: Defines the minimum object area in square pixels.

Smoothing: Indicates the degree of smoothing that is applied to the object outline (0 = no smoothing, 9 = maximum smoothing).

Fill Holes: Check this box to automatically fill any holes in the outline.

When you satisfied with the outlines and the range, click the Validate button. That will convert the magic wand outline to an ROI and add it to the active object. Note that the defined intensity range will be then used to create outlines on other frames with the Auto-Range propagation method.

Smart Segmentation Mode

Use the Smart Segmentation tab to create objects. This method can be used on noisy objects where the Magic Wand has difficulties creating outlines.

Select the Smart tab to define the segmentation recipe parameters and draw reference objects and background areas. When you enter Smart Segmentation mode, the Smart Segmentation sub-panel will be displayed, along with a balloon message: "Adjust smart segmentation parameters and click OK."

When you click OK, whichever objects have been identified by the Select Object tool will be added to the collection of outlines.

  • Filter defines the minimum object area in square pixels.
  • Smoothing is applied to the object outline (0 = no smoothing, 9 = maximum smoothing).

Note: If you want to modify the recipe going through frames, use the Modify Recipe button.

You can also add new outlines to the frame in Smart mode by following these steps:

Make sure that the Auto-Smart propagation mode is selected in the Z-Propagation sub-panel.

Select the Polygon drawing tool and draw one or more ROIs in areas that should be identified as objects. These ROIs can be very rough as they only need to overlap the area detected by the Smart Segmentation.

Click the Validate button. One new object will be created for each ROI that overlaps the smart segmentation mask.

ROI Mode

If you prefer creating object outlines manually, you can switch to the ROI tab. It bas two settings:

  • Filter defines the minimum object area in square pixels.
  • Smoothing is applied to the object outline (0 = no smoothing, 9 = maximum smoothing).

Z-Propagation

The Z-Propagation sub-panel offers you options for propagating the 2D objects from a particular frame across other frames in Z-space. The available options depend on the 2D segmentation type. Options that are not available for a particular 2D segmentation type are shown as inactive.

Use the arrow buttons to navigate through the image stack. The spin controls indicate how many frames you advance each time. The following methods are used to create outlines on new frames.

None: Advancing to a new frame will not add any new outlines to the next frame, or change any existing outlines. Use this method to review the outlines that you’ve defined so far, and also when the object outlines on neighboring frames are very different, and you want to draw outlines on every frame manually.

Duplicate: Changing the frame will duplicate object outlines from the previously active frame.

Auto-Range: Detects an object on a new frame that overlaps with the outline on the previous frame, using the same intensity threshold range. This propagation method is available when you are using the Wand or ROI modes.

Auto-Smart: Detects an object on new frame using global smart segmentation recipe. It will identify any overlapping outlines. This propagation method is available when you are using Smart mode.

You can use any tool from the 2D Segmentation sub-panel on any frame to redefine intensity ranges, smart segmentation recipe or modify the outlines. Any change of method will be repeated throughout the stack.

The detection will stop automatically when no more overlapping objects are detected. You can also stop the auto-detection process manually pressing the <Esc>key.

Object outlines will be automatically detected using the last segmentation recipe. If the object detection is not satisfactory on some frames, the outlines on those frames can be adjusted or re-drawn with the 2D Segmentation tools.

If you are using Smart segmentation, try adjusting the recipe by adding new reference or background objects and click OK.

Note that when you draw outlines manually or edit them, the intensity range within the object’s outlines will be used for other frames when you choose the Auto-Range propagation method. After adjusting the outline manually, click the Validate button to accept the changes. Note that the outline is automatically validated clicking by the Forward or Back button

Use the Forward and Back button to go through the stack by one step at a time. If you use the Auto-Range or Auto-Smart method, and are going through the stack to create correct outlines, you can automate this process using the Detect Forward and/or Detect Back button to go through the all frames in the stack automatically.

The detection will stop automatically when no more overlapping objects are detected. You can also stop the auto-detection process manually pressing the <Esc>key.

Object outlines will be automatically detected using the last segmentation recipe. If the object detection is not satisfactory on some frames, the outlines on those frames can be adjusted or re-drawn with the 2D Segmentation tools.

If you are using Smart segmentation, try adjusting the recipe by adding new reference or background objects and click OK.

Note that when you draw outlines manually or edit them, the intensity range within the object’s outlines will be used for other frames when you choose the Auto-Range propagation method. After adjusting the outline manually, click the Validate button to accept the changes. Note that the outline is automatically validated clicking by the Forward or Back button

Inter-frame outline interpolation

When object outlines change gradually from frame to frame it is possible to skip frames defining outlines. It can be done setting the Step (frames) value bigger than one or just by creating the outlines on selected frames. If object outlines on following frame overlap they can be smoothly interpolated on intermediate frames using Interpolation tools.

Clicking the Interpolate Active Outlinesbutton will create interpolated outlines on intermediate frame for the active object. Interpolation is done on the empty intermediate frames only, the outline point positions are linearly interpolated from one key-frame to another. When the Auto Interpolation option is active, the outlines are automatically interpolated before adding active object as Iso-surface. The interpolated outlines can be removed clicking the Remove Interpolated Outlines button. Note, that interpolated outlines will have prefix ~ in the 2D segmentation pane (e.g. Outlines: ~1).

The two buttonsRemove Tail Outlines and Remove Head Outlines will remove outlines starting from the current frame to the end or to the start of the sequence correspondingly.

Iso-surface

The Iso-surface section allows you to create iso-surfaces on selected objects by connecting the 2D segmented areas across the Z-planes. When all object outlines are created, use the Iso-surface group to add 3D objects as iso-surfaces to the 3D view.

You can add only the active collection using the Add Active button. Clicking the Add All button will add iso-surfaces for all of the defined collections. You can set the sub-sampling and smoothing to use during iso-surface creation. When Oversampling is more than 1, additional frames with interpolated outlines are added, which makes objects smoother. This option can be used on stacks that are under-sampled in the Z direction.

Every object in each collection will be segmented and measured. The values appear in the data table.

If you have an existing iso-surface node and the Create new iso-surface option is not checked, the new objects will be added to that existing iso-surface. If there are no existing iso-surface nodes, or the Create new iso-surface option is checked, then a new iso-surface named Guided Segmentation will be created with the new objects.

The outlines can be viewed in the Slicer by activating the Show Outlines option.